import axios from "axios"

// 配置默认配置
axios.defaults.baseURL = import.meta.env.VITE_BASE_URL
axios.defaults.timeout = 8000

// Add a request interceptor
axios.interceptors.request.use(function (config) {
  return config;
}, function (error) {
  return Promise.reject(error);
});

// Add a response interceptor
axios.interceptors.response.use(function (response) {
  return response;
}, function (error) {
  return Promise.reject(error);
});

export default axios

